package com.example.function.project.controller;

import com.example.common.support.AjaxResponse;
import com.example.common.support.CP_GlobalNamingConstant;
import com.example.common.support.CP_OperateLog;
import com.example.function.project.model.one.ProjectStage;
import com.example.function.project.service.IProjectStageService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


/**
 * Description: <project模块controller >. <br>
 * <p>
 * <基本的crud>
 * </p>
 * generate time:2021-7-27 15:48:58
 *
 * @author hanqf
 * @version V1.0
 */

@RestController
@Slf4j
@RequestMapping("/proj")
public class ProjectStageController {


    @Resource(name = "projectStageService")
    protected IProjectStageService projectStageService;


    /**
     * 查询全部阶段
     *
     * @return AjaxResponse
     */
    @RequestMapping(value = "/stages")
    @CP_OperateLog(value = "查询全部项目阶段", type = CP_GlobalNamingConstant.OPERATE_LIST)
    public AjaxResponse projectStages() {
        final List<ProjectStage> projectStageList = projectStageService.findAll();
        return AjaxResponse.success(projectStageList);
    }


}

